﻿using System.Web.UI;
using System.Web.UI.WebControls;
using TheOutfield.UmbExt.UniversalMediaPicker.Interfaces;

namespace TheOutfield.UmbExt.UniversalMediaPicker.Controls
{
    public abstract class AbstractCreateControl : WebControl, ICreateControl
    {
        public Control Control
        {
            get
            {
                return this;
            }
        }

        public abstract bool TrySave(out MediaItem savedMediaItem, out string message);

        protected override void OnInit(System.EventArgs e)
        {
            base.OnInit(e);
            this.EnsureChildControls();
        }
    }
}